#ifndef PHYSICS_BODY_H
#define PHYSICS_BODY_H

#include <btBulletDynamicsCommon.h>


#include "Vec3.h"
#include <string>



class PhysicsBody
{
public:
	PhysicsBody();
	bool CreateRigidBody(btCollisionShape* shape, float mass);
	virtual void Update() = 0;

	inline virtual void SetPos(const Vec3f& pos);
	inline virtual Vec3f GetPos() const;
	inline virtual void SetVel(const Vec3f& vel);
	inline virtual Vec3f GetVel() const;

	btRigidBody* GetRigidBody();

	virtual void Collided(btManifoldPoint& contact) {};


protected:
	btRigidBody* m_pRigidBody;
	btDefaultMotionState* m_pMotionState;
	btVector3 m_localInertia;
	float m_materialDensity;
	float m_mass;
	bool m_isDynamic;
	Vec3f m_pos;

	std::string m_texPath;
};

#endif